import Vue from 'vue';
import Router from 'vue-router';
import Home from '../views/home';
import About from '../views/about';
import Dev from '../views/dev';
import Edit from '../views/edit';
import Article from '@/views/article';
import Detail from '../views/detail';
import Update from '../views/update';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
    },
    {
      path: '/about',
      name: 'About',
      component: About,
    },
    {
      path: '/dev',
      name: 'Dev',
      component: Dev,
    },
    {
      path: '/edit',
      name: 'Edit',
      component: Edit,
    },
    {
      path: '/article/:id',
      name: 'artcile',
      component: Article,
    },
    {
      path: '/detail/:id',
      name: 'deatil',
      component: Detail,
    },
    {
      path: '/update/:id',
      name: 'update',
      component: Update,
    },
  ],
});
